<?php

namespace App\Api\controllers;

use App\Cascades;
use App\Http\Controllers\Controller;

class CascadesController extends Controller{
    public function getCascades($type= 1,$parent_id = 0){
        $cascades = Cascades::where('type',$type)->where('parent_id',$parent_id)->get();
        $cascades = $cascades->reject(function($fight){
            $fight->text = $fight->name;
        });
        dump($cascades);
    }
}